﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Nivdal
{
    public partial class DevTests : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string UserAccessLevel = "0";
            string UsrId = null;
            GetNivdalData.GetNivdalData GND = new GetNivdalData.GetNivdalData();
            if (!HttpContext.Current.User.Identity.IsAuthenticated)
                Response.Redirect("~/Default.aspx");
            else
            {
                UsrId = GND.ReturnUserId();
                UserAccessLevel = UserAccessLevel = (GND.ReadNivdalIntData("@UserId", "Nivdal_GetUserLevel", UsrId));
                if (UserAccessLevel != ("5"))
                {
                    Response.Redirect("~/Default.aspx");
                }
            }

            if (Request.QueryString["Message"] != null)
            {
                MessageLabel.Text = Request.QueryString["Message"];
            }


        }

        protected void PushResources(object sender, EventArgs e)
        {
            MessageLabel.Text = Resources.Resource.ActivateScoutButtonText;

        }
    }
}